using System;
using OhioState.AssetManaged;
using OhioState.Math;
namespace OhioState.Graphics.Proxy
{

    /// <summary>
    /// ClipPlaneProxy class that clips section of the scene using planes
    /// </summary>
    [Serializable]
    public class ClipPlaneProxy :SharedAsset
    {
        private Plane _plane;
        private bool _above;

        /// <summary>
        /// Check if above the plane needs to be clipped
        /// </summary>
        public bool IsAbove
        {
            get { return _above; }
        }

        /// <summary>
        /// Get/Set Accessor for the Clip plane
        /// </summary>
        public Plane ClipPlane
        {
            get { return _plane; }
            set 
            {
                _plane = value;
                FireUpdateChangedEvent(this);
            }
        }
        /// <summary>
        /// Constructor for clip plane
        /// </summary>
        /// <param name="name">name of the object</param>
        public ClipPlaneProxy(String name)
            : base(name)
        {

        }

        /// <summary>
        /// Constructor for clip plane
        /// </summary>
        /// <param name="plane">plane</param>
        /// <param name="above">choose the half plane based on "above"</param>
        public ClipPlaneProxy(Plane plane, bool above): base ( (above==true?"ClipAbove":"ClipBelow") + plane.Name)
        {
            _plane = plane;
            _above = above;
        }
       
    }
    //[Serializable]
    //public class Dummy: ClipPlaneProxy
    //{
    //    public Dummy(): base("NoClip")
    //    {
    //    }
        
    //}
}
